import { IRequestOption } from '@jl/common/composable';
import { request } from '@jl/common/utils';

/**
 * 获取天地图token
 * @param requestOption - 请求参数
 * @returns
 */
export const getMapWorldToken = (): Promise<any> => {
  return request({
    url: `/api/BasOpe/getMapWorldToken`,
    method: 'GET',
  });
};

/**
 * 编辑天地图token
 * @param requestOption - 请求参数
 * @returns
 */
export const editOrAddToken = (
  requestOption: IRequestOption<any, any>
): Promise<API.Base.ResponsePage<API.Test.Task>> => {
  return request({
    url: `/api/BasOpe/editOrAddToken`,
    method: 'PUT',
    ...requestOption,
  });
};
